Main Page | Data Structures | File List | Data Fields | Globals

BustaModelFoodPiece Class Reference

Food Piece model. More...

#include <BustaModelFoodPiece.h>


Public Member Functions

 BustaModelFoodPiece ()
 Constructor.
 BustaModelFoodPiece (FoodType t, FoodState s)
 Constructor.
 BustaModelFoodPiece (int seed)
 Constructor.
 ~BustaModelFoodPiece ()
 Destructor.
FoodType getType ()
 FoodPiece type.
void setType (FoodType t)
 Sets FoodPiece type.
FoodState getState ()
 Freshness state.
void setState (FoodState s)
 Sets freshness state.
bool getImmobile ()
 Gets immobility.
void setImmobile (bool i)
 Sets immobility.
int updateState ()
 Updates state of FoodPiece.
int freshenState ()
 Updates state of FoodPiece.
int spoilState ()
 Updates state of FoodPiece.


Detailed Description

Food Piece model.

Model representing food piece, includes type, freshness state, timer


Constructor & Destructor Documentation

BustaModelFoodPiece::BustaModelFoodPiece  ) 
 

Constructor.

Initializes variables

BustaModelFoodPiece::BustaModelFoodPiece FoodType  t,
FoodState  s
 

Constructor.

Initializes variables, sets type of food piece to t, state equal to s

BustaModelFoodPiece.BustaModelFoodPiece int  seed  ) 
 

Constructor.

If seed value != 0 then its is a pseudo-random FoodPiece constructor, else it will always construct the same FoodPiece() as long as seed != 0

BustaModelFoodPiece::~BustaModelFoodPiece  ) 
 

Destructor.

Destructor


Member Function Documentation

int BustaModelFoodPiece::freshenState  ) 
 

Updates state of FoodPiece.

Updates the current state of the foodpiece based upon the current time. Returns 1 if switched states, 0 if didn't switch states, and -1 if foodPiece has rotted away

bool BustaModelFoodPiece::getImmobile  ) 
 

Gets immobility.

Returns boolean, saying whether the foodpiece can be swapped around the board or not

FoodState BustaModelFoodPiece::getState  ) 
 

Freshness state.

Returns the current FoodPiece freshness state

FoodType BustaModelFoodPiece::getType  ) 
 

FoodPiece type.

Gets the type of FoodPiece

void BustaModelFoodPiece::setImmobile bool  i  ) 
 

Sets immobility.

Sets whether the foodpiece can be swapped around the board

void BustaModelFoodPiece::setState FoodState  s  ) 
 

Sets freshness state.

Sets the current FoodPiece freshness state

void BustaModelFoodPiece::setType FoodType  t  ) 
 

Sets FoodPiece type.

Sets the type of FoodPiece

int BustaModelFoodPiece::spoilState  ) 
 

Updates state of FoodPiece.

Updates the current state of the foodpiece based upon the current time. Returns 1 if switched states, 0 if didn't switch states, and -1 if foodPiece has rotted away

int BustaModelFoodPiece::updateState  ) 
 

Updates state of FoodPiece.

Updates the current state of the foodpiece based upon the current time. Returns 1 if switched states, 0 if didn't switch states, and -1 if foodPiece has rotted away


Generated on Sun Aug 14 22:24:56 2005 for BustaSandwich Models by  doxygen 1.4.2-20050421